home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / mui / muirexx2.2 / demos / demo.rexx < prev    next >
OS/2 REXX Batch file  |  1996-09-29  |  13KB  |  267 lines

  1. /* */
  2. options results
  3.  
  4. /* Method TAG ID definitions */
  5.  
  6. Notify = 0x8042c9cb
  7. Set = 0x8042549a
  8. NoNotifySet = 0x8042216f
  9. Application_AboutMUI = 0x8042d21d /*            { ULONG MethodID; Object *refwindow; }; */
  10. Application_OpenConfigWindow = 0x804299ba /*    { ULONG MethodID; ULONG flags; }; */
  11.  
  12. /* Attribute TAG ID definitions */
  13.  
  14. Draggable = 0x80420b6e
  15. Listview_DragType = 0x80425cd3
  16. List_Format =                     0x80423c0a /* V4  isg STRPTR            */
  17. FillArea =                        0x804294a3 /* V4  is. BOOL              */
  18. Frame =                           0x8042ac64 /* V4  i.. LONG              */
  19. Weight =                          0x80421d1f /* V4  i.. WORD              */
  20. Gauge_Current =                   0x8042f0dd /* V4  isg LONG              */
  21. Gauge_Divide =                    0x8042d8df /* V4  isg BOOL              */
  22. Gauge_Horiz =                     0x804232dd /* V4  i.. BOOL              */
  23. Gauge_Max =                       0x8042bcdb /* V4  isg LONG              */
  24. Numeric_Value = 0x8042ae3a
  25. Menuitem_Title = 0x804218be
  26. Menuitem_Shortcut =               0x80422030 /* V8  isg STRPTR            */
  27. Boopsi_MinHeight =                0x80422c93 /* V4  isg ULONG             */
  28. Boopsi_MinWidth =                 0x80428fb2 /* V4  isg ULONG             */
  29. Boopsi_Remember =                 0x8042f4bd /* V4  i.. ULONG             */
  30. Boopsi_TagScreen =                0x8042bc71 /* V4  isg ULONG             */
  31. WHEEL_Hue =                       0x84000001
  32. WHEEL_Saturation =                0x84000002
  33. WHEEL_Screen =                    0x84000009
  34.  
  35. /* TAG variable definitions */
  36.  
  37. TRUE = 1
  38. FALSE = 0
  39. Listview_DragType_None = 0
  40. Listview_DragType_Immediate = 1
  41. Frame_None = 0
  42. Frame_Text = 3
  43. TriggerValue = 0x49893131
  44. EveryTime = 0x49893131
  45.  
  46. address DEMO
  47.  
  48. window ID WDEMO TITLE '"MUIRexx Demo"' COMMAND '"quit"' PORT DEMO
  49.     menu LABEL '"Project"'
  50.         item COMMAND '"method 'Application_AboutMUI' 0"' PORT DEMO LABEL '"About MUI"'
  51.         menu LABEL '"Settings"'
  52.             item COMMAND '"method 'Application_OpenConfigWindow'"' PORT DEMO LABEL '"MUI..."'
  53.         endmenu
  54.         item ATTRS Menuitem_Title '-1'
  55.         item COMMAND '"quit"' PORT DEMO ATTRS Menuitem_Shortcut 'Q' LABEL '"Quit"'
  56.     endmenu
  57.     text LABEL 'A demonstration of MUIRexx'
  58.     group REGISTER LABELS '"Gadgets,Lists,Cycles,Icons,Strings,Boopsi"'
  59.         group
  60.             menu LABEL '"Demo"'
  61.                 item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Menuitem 1"'
  62.                 item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Menuitem 2"'
  63.                 menu LABEL '"Submenu"'
  64.                     item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Submenuitem 1"'
  65.                     item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Submenuitem 2"'
  66.                 endmenu
  67.             endmenu
  68.             view ID GVIEW '"A simple demonstration of some of the gadgets available. 
  69. Most gadgets are internal to MUIRexx but others are built from internal and 
  70. external classes.  Notice that some gadgets are linked to others."'
  71.             object CLASS '"Balance.mui"'
  72.             group HORIZ
  73.                 object ID GCLR CLASS '"Coloradjust.mui"'
  74.                 object CLASS '"Balance.mui"'
  75.                 group
  76.                     space
  77.                     group HORIZ
  78.                         space HORIZ
  79.                         group
  80.                             knob ID KNOB HELP '"an example knob gadget\012Press HELP for more info"' NODE '"knob"'
  81.                             popslider ID PSLD HELP '"an example popup slider gadget\nPress HELP for more info"' NODE '"popslider"'
  82.                         endgroup
  83.                         meter ID METR NODE '"meter"' LABEL '"meter"'
  84.                         space HORIZ
  85.                     endgroup
  86.                     slider ID SLDR HELP '"an example slider gadget\nPress HELP for more info"' NODE '"slider"'
  87.                     gauge ID GAUG NODE '"gauge"' LABEL '"level %ld"' ATTRS Gauge_Horiz TRUE
  88.                     object CLASS '"Scale.mui"'
  89.                     space
  90.                 endgroup
  91.             endgroup
  92.             group 'FRAME' HORIZ
  93.                 check COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"check"' STRINGS '"unselected,selected"'
  94.                 text COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"text"' LABEL 'text'
  95.                 button COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"button"' LABEL 'button'
  96.                 image COMMAND '"string ID STR CONTENT %s"' PORT DEMO NODE '"image"' SPEC '"4:MUI:Images/WD/13pt/PopUp.mf0"' STRING 'image'
  97.                 object CLASS '"Balance.mui"'
  98.                 string ID STR
  99.             endgroup
  100.             object CLASS '"Busy.mcc"' ATTRS Weight 0
  101.         endgroup
  102.         group
  103.             view '"A demonstration of some lists available. Notice that the 
  104. volume list is linked to the directory list and the directory list is linked 
  105. to the string gadget. This view list is another example of a possible list. 
  106. Note that view lists are read-only."'
  107.             group HORIZ
  108.                 group ATTRS Weight 0
  109.                     button ID DF0 ATTRS Draggable TRUE LABEL 'DF0:'
  110.                     button ID DH0 ATTRS Draggable TRUE LABEL 'DH0:'
  111.                     button ID DH1 ATTRS Draggable TRUE LABEL 'DH1:'
  112.                     button ID SYS ATTRS Draggable TRUE LABEL 'SYS:'
  113.                     button ID RAM ATTRS Draggable TRUE LABEL 'RAM:'
  114.                 endgroup
  115.                 dirlist ID DIR1 PATH '"ram:"' PRESS APP DROP,
  116.                     COMMAND '"dirlist ID DIR1 PATH %s"' PORT DEMO NODE '"dirlist"',
  117.                     ATTRS Frame Frame_Text Listview_DragType Listview_DragType_Immediate
  118.                 volumelist,
  119.                     COMMAND '"dirlist ID DIR1 PATH %s"' PORT DEMO NODE '"volumelist"',
  120.                     ATTRS Weight 50
  121.                 group
  122.                     space
  123.                     button ID VIEW ICON '"muirexx:demos/icons/multiview"' DROP,
  124.                         COMMAND '"string ID FILE CONTENT view %s"' PORT DEMO NODE '"button"'
  125.                     space
  126.                 endgroup
  127.             endgroup
  128.             string ID FILE
  129.         endgroup
  130.         group
  131.             view '"A demonstration of cycle and radio gadgets. This page shows 
  132. some more examples of linked gadgets."'
  133.             group HORIZ
  134.                 group 'FRAME' LABEL '"Computer:"'
  135.                     radio ID RCMP,
  136.                         COMMAND '"cycle ID CCMP LABEL %s"' PORT DEMO NODE '"radio"',
  137.                         LABELS '"Amiga_500,Amiga_600,Amiga_1000,Amiga_1200,Amiga_2000,Amiga_3000,Amiga_4000,Amiga_4000T"'
  138.                 endgroup
  139.                 group
  140.                     group 'FRAME' LABEL '"Printer:"'
  141.                         radio ID RPRT,
  142.                             COMMAND '"cycle ID CPRT LABEL %s"' PORT DEMO NODE '"radio"',
  143.                             LABELS '"HP_Deskjet,NEC_P6,Okimate_20"'
  144.                     endgroup
  145.                     group 'FRAME' LABEL '"Display:"'
  146.                         radio ID RDSP,
  147.                             COMMAND '"cycle ID CDSP LABEL %s"' PORT DEMO NODE '"radio"',
  148.                             LABELS '"A1081,NEC_3D,A2024,Eizo_T660i"'
  149.                     endgroup
  150.                 endgroup
  151.                 group 'FRAME' LABEL '"Cycle Gadgets"'
  152.                     group HORIZ
  153.                         group
  154.                             label '"Computer:"'
  155.                             label '"Printer:"'
  156.                             label '"Display:"'
  157.                         endgroup
  158.                         group
  159.                             cycle ID CCMP,
  160.                                 COMMAND '"radio ID RCMP LABEL %s"' PORT DEMO NODE '"cycle"',
  161.                                 LABELS '"Amiga_500,Amiga_600,Amiga_1000,Amiga_1200,Amiga_2000,Amiga_3000,Amiga_4000,Amiga_4000T"'
  162.                             cycle ID CPRT,
  163.                                 COMMAND '"radio ID RPRT LABEL %s"' PORT DEMO NODE '"cycle"',
  164.                                 LABELS '"HP_Deskjet,NEC_P6,Okimate_20"'
  165.                             cycle ID CDSP,
  166.                                 COMMAND '"radio ID RDSP LABEL %s"' PORT DEMO NODE '"cycle"',
  167.                                 LABELS '"A1081,NEC_3D,A2024,Eizo_T660i"'
  168.                         endgroup
  169.                     endgroup
  170.                 endgroup
  171.             endgroup
  172.         endgroup
  173.         group
  174.             view '"A demonstration of icon gadgets. Try clicking on the icons 
  175. below. Also try dropping some icons from the Workbench onto these icons.  Try 
  176. to figure out what is unusual about the image on the right (hint: it is a gadget)."'
  177.             group HORIZ
  178.                 button ID ICN1 ICON '"muirexx:demos/icons/edit"' PRESS APP DROP,
  179.                     COMMAND '"string ID ISTR CONTENT edit %s"' PORT DEMO NODE '"button"',
  180.                     LABEL 'ascii'
  181.                 button ID ICN2 ICON '"muirexx:demos/icons/paint"' PRESS APP DROP,
  182.                     COMMAND '"string ID ISTR CONTENT view %s"' PORT DEMO NODE '"button"',
  183.                     LABEL 'picture'
  184.                 button ID ICN3 ICON '"muirexx:demos/icons/multiview"' PRESS APP DROP,
  185.                     COMMAND '"string ID ISTR CONTENT play %s"' PORT DEMO NODE '"button"',
  186.                     LABEL 'anim'
  187.                 button ID ICN4 ICON '"muirexx:demos/icons/help"' PRESS APP DROP,
  188.                     COMMAND '"string ID ISTR CONTENT %s"' PORT DEMO NODE '"button"',
  189.                     LABEL 'project'
  190.                 button ID ICN5 ICON '"muirexx:demos/icons/shell"' PRESS APP DROP,
  191.                     COMMAND '"string ID ISTR CONTENT execute %s"' PORT DEMO NODE '"button"',
  192.                     LABEL 'tool'
  193.                 space HORIZ
  194.                 button PICT '"muirexx:demos/muirexx.brush"' TRANS,
  195.                     ATTRS Frame Frame_None Draggable TRUE,
  196.                     LABEL 'muirexx.brush'
  197.             endgroup
  198.             string ID ISTR
  199.         endgroup
  200.         group
  201.             view '"A demonstration of string gadgets. Try typing in some text 
  202. into the string gadget. Also select a file using the popasl gadget. Once some 
  203. lines have been added to the list try double clicking on one."'
  204.             list ID SLST COMMAND '"string ID SSTR CONTENT %s"' PORT DEMO NODE '"list"'
  205.             group HORIZ
  206.                 group
  207.                     label DOUBLE '"Entry:"'
  208.                     label DOUBLE '"File:"'
  209.                 endgroup
  210.                 group
  211.                     string ID SSTR COMMAND '"list ID SLST UPDATE INSERT STRING %s"' PORT DEMO NODE '"string"'
  212.                     popasl ID SASL COMMAND '"list ID SLST UPDATE INSERT STRING %s"' PORT DEMO NODE '"popasl"'
  213.                 endgroup
  214.             endgroup
  215.         endgroup
  216.         group
  217.             view '"A simple demonstration of boopsi gadgets.  This demo 
  218. essentially duplicates the BoopsiDoor demo included with the MUI 
  219. distribution.  It illustrates use of boopsi gadgets in MUIRexx and also 
  220. shows an example of notification methods."'
  221.             group HORIZ
  222.                 group
  223.                     label DOUBLE '"Hue:"'
  224.                     label DOUBLE '"Saturation:"'
  225.                 endgroup
  226.                 group
  227.                     gauge ID HUE ATTRS Gauge_Max 16384,
  228.                                        Gauge_Divide 262144,
  229.                                        Gauge_Horiz TRUE
  230.                     gauge ID SAT ATTRS Gauge_Max 16384,
  231.                                        Gauge_Divide 262144,
  232.                                        Gauge_Horiz TRUE
  233.                 endgroup
  234.             endgroup
  235.             object ID BOOP BOOPSI CLASS '"colorwheel.gadget"',
  236.                 ATTRS Boopsi_MinWidth 30,
  237.                       Boopsi_MinHeight 30,
  238.                       Boopsi_Remember WHEEL_Hue,
  239.                       Boopsi_Remember WHEEL_Saturation,
  240.                       Boopsi_TagScreen WHEEL_Screen,
  241.                       WHEEL_Screen 0,
  242.                       WHEEL_Saturation 0,
  243.                       FillArea TRUE
  244.         endgroup
  245.     endgroup
  246.     menu LABEL '"Demo"'
  247.         item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Menuitem 1"'
  248.         item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Menuitem 2"'
  249.         menu LABEL '"Submenu"'
  250.             item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Submenuitem 1"'
  251.             item COMMAND '"string ID STR CONTENT %s"' PORT DEMO LABEL '"Submenuitem 2"'
  252.         endmenu
  253.     endmenu
  254. endwindow
  255.  
  256. method ID KNOB Notify Numeric_Value EveryTime @METR 3 Set Numeric_Value TriggerValue
  257. method ID KNOB Notify Numeric_Value EveryTime @PSLD 3 NoNotifySet Numeric_Value TriggerValue
  258. method ID PSLD Notify Numeric_Value EveryTime @METR 3 Set Numeric_Value TriggerValue
  259. method ID PSLD Notify Numeric_Value EveryTime @KNOB 3 NoNotifySet Numeric_Value TriggerValue
  260. method ID SLDR Notify Numeric_Value EveryTime @GAUG 3 Set Gauge_Current TriggerValue
  261.  
  262. method ID BOOP Notify WHEEL_Hue EveryTime @HUE 4 Set Gauge_Current TriggerValue
  263. method ID BOOP Notify WHEEL_Saturation EveryTime @SAT 4 Set Gauge_Current TriggerValue
  264.  
  265. list ID SLST APP COMMAND '"list ID SLST UPDATE INSERT STRING %s"' PORT DEMO
  266. exit
  267.